<?php
$strSQL = "select * from bet_LottoWeb where ID = ".str_replace("'","\'",$_data["ID"]);

if($RS = @PMA_mysql_query($strSQL, $$_Conn)){
	if(PMA_mysql_num_rows($RS) == 0){
		header("Location: ".basename($_SERVER["PHP_SELF"])."?op=List");
		exit();
	}else{
		$Rows = PMA_mysql_fetch_object($RS);
	}
}else{
	header("Location: ".basename($_SERVER["PHP_SELF"])."?op=List");
	exit();
}

?><html>
<head>
<title> <?php print $_strAdminProgram["Title"];?> (Edit) </title>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<link rel="stylesheet" href="/css/backend.css" type="text/css">
<script Language="JavaScript">
<!--
function finalcheck(){
	with(document.beMemberFrm){
		submit();
	}
}

function backlist(){
	with(document.beMemberFrm){
		op.value = "List";
		submit();
	}
}
//-->
</SCRIPT>
</head>

<body class="Mybody">

<form name="beMemberFrm" method="Post" action="index.php">
<input type="hidden" name="op" value="Update">
<input type="hidden" name="ID" value="<?php print $Rows -> ID;?>">
<input type="hidden" name="Page" value="<?php print $_data["Page"];?>">
<table class="MyTable" cellspacing="1" cellpadding="0">
	<tr>
		<td class="MyUp" colspan="2">
			<table width="100%" cellspacing="0" cellpadding="0" border="0">
				<tr>
					<td align="left" class="MyUp_Title"><?php print $_strAdminProgram["Title"];?> (Edit)</td>
					<td align="right" class="MyUp_Title"><?php include "MenuPage.php";?></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class="MyTitle"><?php print $_strAdminProgram["ID"];?><!--序號//--></td>
		<td class="MyCell"><?php print $Rows -> ID;?></td>
	</tr>
	<tr>
		<td class="MyTitle">Domain</td>
		<td class="MyCell">
			<input type="text" name="data[Domain_x]" class="input_text" value="<?php print $Rows -> Domain;?>">
		</td>
	</tr>
	<tr>
		<td class="MyTitle">Name</td>
		<td class="MyCell">
			<input type="text" name="data[Name_x]" class="input_text" value="<?php print $Rows -> Name;?>">
		</td>
	</tr>
	<tr>
		<td class="MyTitle">DB</td>
		<td class="MyCell">
			<input type="text" name="data[DB_x]" class="input_text" value="<?php print $Rows -> DB;?>">
		</td>
	</tr>
	<tr>
		<td class="MyTitle">目錄</td>
		<td class="MyCell">
			<input type="text" name="data[DirName_x]" class="input_text" value="<?php print $Rows -> DirName;?>">
		</td>
	</tr>
	<tr>
		<td class="MyTitle">级别</td>
		<td class="MyCell">
			<input type="radio" name="data[WebClass_n]" class="input_text" value="0"<?php print ($Rows -> WebClass == 0?" checked":"")?>><?php print $arrWebClass[0];?>
			<input type="radio" name="data[WebClass_n]" class="input_text" value="1"<?php print ($Rows -> WebClass == 1?" checked":"")?>><?php print $arrWebClass[1];?>
		</td>
	</tr>
	<tr>
		<td class="MyTitle">SLB1 IP</td>
		<td class="MyCell">
			<input type="text" name="data[SLB1IP_x]" class="input_text" value="<?php print $Rows -> SLB1IP;?>">
		</td>
	</tr>
	<tr>
		<td class="MyTitle">SLB1 Server</td>
		<td class="MyCell">
			<input type="text" name="data[SLB1Server_x]" class="input_text" value="<?php print $Rows -> SLB1Server;?>">
		</td>
	</tr>
		<tr>
		<td class="MyTitle">SLB1 Port</td>
		<td class="MyCell">
			<input type="text" name="data[SLB1Port_x]" class="input_text" value="<?php print $Rows -> SLB1Port;?>">
		</td>
	</tr>
	<tr>
		<td class="MyTitle">SLB2 IP</td>
		<td class="MyCell">
			<input type="text" name="data[SLB2IP_x]" class="input_text" value="<?php print $Rows -> SLB2IP;?>">
		</td>
	</tr>
	<tr>
		<td class="MyTitle">SLB2 Server</td>
		<td class="MyCell">
			<input type="text" name="data[SLB2Server_x]" class="input_text" value="<?php print $Rows -> SLB2Server;?>">
		</td>
	</tr>
		<tr>
		<td class="MyTitle">SLB2 Port</td>
		<td class="MyCell">
			<input type="text" name="data[SLB2Port_x]" class="input_text" value="<?php print $Rows -> SLB2Port;?>">
		</td>
	</tr>
	<tr>
		<td class="MyButton" colspan="2" align="center">
			<input type="button" value="<?php print $_strAdminProgram["_EditSubmit"];?>" onclick="finalcheck()" class="submit"><!--修改//-->
			<input type="button" value="<?php print $_strAdminProgram["_BackList"];?>" onclick="backlist()" class="submit"><!--回清單//-->
		</td>
	</tr>
</table>
</form>

</body>
</html>